home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntutm94.zoo / limit.1z / limit.1z
Encoding:
Text File  |  1992-06-21  |  2.1 KB  |  50 lines

  1.  
  2. NAME
  3.     limit - run a program, restricting its resources
  4.  
  5. SYNOPSIS
  6.     limit  [  -m  maxalloc  ] [ -M maxmem ] [ -t maxtime ] program [
  7.     args...  ]
  8.     limit -v
  9.  
  10. DESCRIPTION
  11.     limit runs a subprogram with limited memory and time  resources.
  12.     maxalloc  is  the  maximum  amount  of  heap  +  malloc'd memory
  13.     permitted to the program.  maxmem is the maximum total amount of
  14.     memory allotted to the program.  If both  allocation  and  total
  15.     memory  limits are in effect, a program is limited to the lesser
  16.     of the two values.  maxtime is the maximum amount of CPU time  a
  17.     process  may consume; note that this is not the same as the real
  18.     time the process has been executing, since  processes  that  are
  19.     waiting for input/output consume very little (if any) CPU time.
  20.  
  21.     maxalloc  and  maxmem are numbers (optionally followed by "K" or
  22.     "k"), denoting the memory size in bytes.  maxtime has the form:
  23.  
  24.         [[hh:]mm:]ss[.xxx]
  25.  
  26.     giving the number of hours, minutes, seconds,  and  milliseconds
  27.     permitted;   the   hours,  minutes,  and  milliseconds  are  all
  28.     optional.
  29.  
  30. EXAMPLE
  31.     The following runs command foo with a maximum memory  allocation
  32.     of 102400 bytes, a total memory limit of 200512 bytes, and a CPU
  33.     time limit of 12 minutes, 22.15 seconds.
  34.  
  35.         limit -m 100K -M 200512 -t 12:22.15 foo
  36.  
  37. NOTES
  38.     If  any  of  the  limits  are 0, then the corresponding limit is
  39.     removed; otherwise, the default limits are whatever  the  limits
  40.     were on the limit program itself.  These may be printed with the
  41.     -v flag.
  42.  
  43. IMPLEMENTATION
  44.     Built with  the  MiNT library, patchlevel 19.  Using a different
  45.     library, or an earlier version of the MiNT library, may  or  may
  46.     not  cause problems; in particular, various constants defined in
  47.     <signal.h> and <ioctl.h> will probably be wrong if you  are  not
  48.     using the MiNT library.
  49.  
  50.